package jiinn.beans;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import jiinn.interfaces.MemberDAO;
import jiinn.models.MemberVO;

@Repository("memberDAO")
public class MemberDAOImpl implements MemberDAO {
	
	@Autowired
	private SqlSession sess;

	@Override
	public boolean insertMember(MemberVO m) {		
		return sess.insert("memberMapper.insertMember", m)>0;
	}

	@Override
	public List<MemberVO> selectMember() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public MemberVO selectOneMember(String mno) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean updateMember(String mno) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean deleteMember(String mno) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int joinChkMember(MemberVO m) {
		return sess.selectOne("memberMapper.joinChkMember", m);
	}

	@Override
	public int checkUid(String uid) {		
		return sess.selectOne("memberMapper.chkUid", uid);
	}

	@Override
	public String loginMember(MemberVO m) {		
		return sess.selectOne("memberMapper.loginMember", m);
	}

	
}
